	
/****** Object:  Stored Procedure USERUpdate    Script Date: Monday, December 10, 2007 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spUSERUpdate]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [spUSERUpdate]
GO

	
	

	
/******************************************************************************
**		File: 
**		Name: spUSERUpdate
**		Desc: 
**
**		Return values:
** 
**		Called by:   
**              
**		Parameters:
**		Input							Output
**     ----------							-----------
**
**		Auth: CodeSmith
**		Date: 12/10/2007 10:20:44 PM
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:				Description:
**		--------		--------				-------------------------------------------
**    
*******************************************************************************/
CREATE PROCEDURE spUSERUpdate
	@US_ID_PK int, 
	@NAME varchar(50), 
	@LOGIN_NAME varchar(20), 
	@PASSWORD varchar(50), 
	@EMAIL varchar(50), 
	@USER_TYPE tinyint, 
	@CUSTOMER_CODE varchar(20), 
	@BAR_CODE varchar(7), 
	@IS_ADMIN bit, 
	@IS_ENABLED bit, 
	@CREATED_DATE datetime, 
	@CREATED_BY int, 
	@UPDATED_DATE datetime, 
	@UPDATED_BY int, 
	@CHANGE_PWD_GUID uniqueidentifier, 
	@SORT_REFERENCE1 varchar(20), 
	@SORT_REFERENCE2 varchar(20), 
	@DOWNLOADABLE_CSV bit, 
	@ActiveOfficeID int, 
	@CountryID int 
AS

UPDATE [USER] SET
	[NAME] = @NAME,
	[LOGIN_NAME] = @LOGIN_NAME,
	[PASSWORD] = @PASSWORD,
	[EMAIL] = @EMAIL,
	[USER_TYPE] = @USER_TYPE,
	[CUSTOMER_CODE] = @CUSTOMER_CODE,
	[BAR_CODE] = @BAR_CODE,
	[IS_ADMIN] = @IS_ADMIN,
	[IS_ENABLED] = @IS_ENABLED,
	[CREATED_DATE] = @CREATED_DATE,
	[CREATED_BY] = @CREATED_BY,
	[UPDATED_DATE] = @UPDATED_DATE,
	[UPDATED_BY] = @UPDATED_BY,
	[CHANGE_PWD_GUID] = @CHANGE_PWD_GUID,
	[SORT_REFERENCE1] = @SORT_REFERENCE1,
	[SORT_REFERENCE2] = @SORT_REFERENCE2,
	[DOWNLOADABLE_CSV] = @DOWNLOADABLE_CSV,
	[ActiveOfficeID] = @ActiveOfficeID,
	[CountryID] = @CountryID
WHERE
	[US_ID_PK] = @US_ID_PK

GO
